'use strict';
exports.main = async (event, context) => {
	//event为客户端上传的参数
	uniCloud.logger.log('event : ', event)
	return new Promise((resolve,reject)=>{
		const db=uniCloud.database();
		const collect=db.collection("userInfo").where(event).get({
			getCount:true
		})
		.then(res=>{
			resolve(res)
		}).catch(err=>{
			reject(err)
		})
		})
		
		
	//返回数据给客户端
	return event
};
